<%@page import="com.java.model.MusicInfo"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="icon" href="./icon/ico.ico">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%
	ArrayList<MusicInfo> list;
	if (request.getAttribute("result") != null) {
		list = (ArrayList<MusicInfo>) request.getAttribute("result");
		System.out.println(list.size());
	} else {
		list = new ArrayList<MusicInfo>();
	}
%>
<title>查询</title>
</head>
<body>

	<%
		if (list.size() != 0) {
	%>
	<table class="table table-hover" border="0sp" width="100%">
		<tr align="center">
			<th colspan="1" rowspan="1" headers="" scope="col" width="10%">
				ID</th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="30%">
				名字</th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="30%">
				演唱者</th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="10%">
				下载次数</th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="10%">
				播放次数</th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="5%">
				播放</th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="5%">
				下载</th>
		</tr>
		<%
			for (int i = 0; i < list.size(); i++) {
		%>
		<tr align="center">
			<th colspan="1" rowspan="1" headers="" scope="col" width="10%">
				<%=(i + 1)%></th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="30%">
				<%=(list.get(i).getName())%></th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="30%">
				<%=list.get(i).getPlayer()%></th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="10%">
				<%=list.get(i).getDownload()%></th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="10%">
				<%=list.get(i).getPlay()%></th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="5%"><a
				href="play.jsp?id=<%=list.get(i).getId()%>"><img alt="text"
					src="./icon/play.ico" width="30sp" height="30sp"> </a></th>
			<th colspan="1" rowspan="1" headers="" scope="col" width="5%"><a
				href="download.jsp?id=<%=list.get(i).getId()%>"> <img alt="text"
					src="./icon/download.ico" width="30sp" height="30sp">
			</a></th>
		</tr>
		<%
			}
			} else {
		%>
		<p>暂无此结果</p>

		<%
			}
		%>
	
</body>
</html>